#include <iostream>
using namespace std;

int main()
{
	int n = 0, coal = 0, sum = 0;
	cin >> n;
	for(int i = 1; i <= n; i++)
	{
		coal += i;
		sum += coal;
	}
	cout << coal << endl;
	cout << sum << endl;
	return 0;
}
